<div ng-init="init();" class="kmi-layout-content A01-content">
    <div class="kmi-header-row">
        <div class="kmi-side-btn left" ng-click="back();">
            <i class="material-icons">&#xE408;</i>
            <div class="kmi-can-click"></div>
        </div>
        <div class="brand-title">
            <div class="custom" ng-if="companyName">
                <div class="title" ng-bind="companyName"></div>
                <img src="" alt="" class="brand">
                <div class="gap"></div>
            </div>
            <div class="digiwin">
                <img src="image/smes_v340/logo_ch.png" alt="">
                <img src="image/smes_v340/logo_en.png" alt="">
            </div>
        </div>
        <div class="header-title" ng-bind="'A06.title' | translate"></div>
        <div class="header-logo"></div>
    </div>
    <div class="kmi-layout-main-content">
        <div class="kmi-layout-page">
            <div>
                <div class="kmi-text-fields">
                    <!-- 20201229 add FOR #83492 -->
                    <label class="label" ng-bind="'A06.fileName' | translate"
                        style="margin-left: 5px; font-size: 1.2rem;  font-weight: 800;"></label>
                    <input ng-model="fileName" readonly="readonly"></input>
                    <div class="kmi-button kmi-button-confrim" ng-click="upload();"
                        style="width:100px;margin-right: 60px;">
                        <label ng-bind="'A06.btn.upload' | translate" class="ng-binding"></label>
                        <div class="kmi-can-click">
                            <input type="file" style="opacity:0" name="file" id="file" accept=".xls,.xlsx"
                                onchange="angular.element(this).scope().importExcel(event, this)">
                        </div>
                    </div>
                    <div style="display: flex;">
                        <div class="kmi-button kmi-button-confrim" ng-click="templateDownload();"
                            style="width:100px;">
                            <label ng-bind="'A06.btn.templateDownload' | translate" class="ng-binding"></label>
                            <div class="kmi-can-click"></div>
                        </div>
                        <div class="kmi-button kmi-button-confrim" ng-click="sampleDownload();"
                            style="width:100px;">
                            <label ng-bind="'A06.btn.sampleDownload' | translate" class="ng-binding"></label>
                            <div class="kmi-can-click"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="kmi-list machine-list">
                <div class="kmi-list__header">
                    <div class="kmi-list__column" style="flex:0 0 40px"></div>
                    <div class="kmi-list__column" style="flex:0 0 40px" ng-bind="'A06.header.status' | translate"></div>
                    <!-- 生产批号 -->
                    <div class="kmi-list__column require head-controls" style="flex:1;">
                        <div class="filter" ng-show="dispatch_filterSH.lot_no">
                            <input ng-model="dispatch_filter.lot_no">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                                ng-click="dispatch_filterSH.lot_no = false;dispatch_filter.lot_no = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dispatch_filterSH.lot_no">
                            <i class="material-icons search" style="z-index:1;" ng-click="dispatch_filterSH.lot_no = true">search</i>
                            <label ng-bind="'A06.header.lotNo'| translate"></label>
                            <i class="material-icons" ng-show="order_by_mode.name == 'lot_no'">{{order_by_mode.sort?'&#xE5DB;':'&#xE5D8;'}}</i>
                            <div class="kmi-can-click" ng-click="orderbychange('lot_no')"></div>
                        </div>
                     </div>
                     <!-- 作业站 -->
                     <div class="kmi-list__column require head-controls" style="flex:1;">
                        <div class="filter" ng-show="dispatch_filterSH.op_no">
                            <input ng-model="dispatch_filter.op_no">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                                ng-click="dispatch_filterSH.op_no = false;dispatch_filter.op_no = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dispatch_filterSH.op_no">
                            <i class="material-icons search" style="z-index:1;" ng-click="dispatch_filterSH.op_no = true">search</i>
                            <label ng-bind="'A06.header.opNo'| translate"></label>
                            <i class="material-icons" ng-show="order_by_mode.name == 'op_no'">{{order_by_mode.sort?'&#xE5DB;':'&#xE5D8;'}}</i>
                            <div class="kmi-can-click" ng-click="orderbychange('op_no')"></div>
                        </div>
                    </div>
                    <!-- 数量 -->
                    <div class="kmi-list__column require head-controls" style="flex:1;">
                        <div class="filter" ng-show="dispatch_filterSH.qty">
                            <input ng-model="dispatch_filter.qty">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                                ng-click="dispatch_filterSH.qty = false;dispatch_filter.qty = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dispatch_filterSH.qty">
                            <i class="material-icons search" style="z-index:1;" ng-click="dispatch_filterSH.qty = true">search</i>
                            <label ng-bind="'A06.header.qty'| translate"></label>
                            <i class="material-icons" ng-show="order_by_mode.name == 'qty'">{{order_by_mode.sort?'&#xE5DB;':'&#xE5D8;'}}</i>
                            <div class="kmi-can-click" ng-click="orderbychange('qty')"></div>
                        </div>
                    </div>
                     <!-- 设备编号 -->
                     <div class="kmi-list__column require head-controls" style="flex:1;">
                        <div class="filter" ng-show="dispatch_filterSH.machine_no">
                            <input ng-model="dispatch_filter.machine_no">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                                ng-click="dispatch_filterSH.machine_no = false;dispatch_filter.machine_no = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dispatch_filterSH.machine_no">
                            <i class="material-icons search" style="z-index:1;" ng-click="dispatch_filterSH.machine_no = true">search</i>
                            <label ng-bind="'A06.header.machine_no'| translate"></label>
                            <i class="material-icons" ng-show="order_by_mode.name == 'machine_no'">{{order_by_mode.sort?'&#xE5DB;':'&#xE5D8;'}}</i>
                            <div class="kmi-can-click" ng-click="orderbychange('machine_no')"></div>
                        </div>
                     </div>
                     <!-- 派工日期 -->
                     <div class="kmi-list__column require head-controls" style="flex:1;">
                        <div class="filter" ng-show="dispatch_filterSH.dispatch_date">
                            <input ng-model="dispatch_filter.dispatch_date">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                                ng-click="dispatch_filterSH.dispatch_date = false;dispatch_filter.dispatch_date = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dispatch_filterSH.dispatch_date">
                            <i class="material-icons search" style="z-index:1;" ng-click="dispatch_filterSH.dispatch_date = true">search</i>
                            <label ng-bind="'A06.header.dispatch_date'| translate"></label>
                            <i class="material-icons" ng-show="order_by_mode.name == 'dispatch_date'">{{order_by_mode.sort?'&#xE5DB;':'&#xE5D8;'}}</i>
                            <div class="kmi-can-click" ng-click="orderbychange('dispatch_date')"></div>
                        </div>
                    </div>
                     <!-- 派工开始时间 -->
                     <div class="kmi-list__column require head-controls" style="flex:1;">
                        <div class="filter" ng-show="dispatch_filterSH.dispatch_start_date">
                            <input ng-model="dispatch_filter.dispatch_start_date">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                                ng-click="dispatch_filterSH.dispatch_start_date = false;dispatch_filter.dispatch_start_date = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dispatch_filterSH.dispatch_start_date">
                            <i class="material-icons search" style="z-index:1;" ng-click="dispatch_filterSH.dispatch_start_date = true">search</i>
                            <label ng-bind="'A06.header.dispatch_start_date'| translate"></label>
                            <i class="material-icons" ng-show="order_by_mode.name == 'dispatch_start_date'">{{order_by_mode.sort?'&#xE5DB;':'&#xE5D8;'}}</i>
                            <div class="kmi-can-click" ng-click="orderbychange('dispatch_start_date')"></div>
                        </div>
                    </div>
                    <!-- 派工结束时间 -->
                    <div class="kmi-list__column require head-controls" style="flex:1;">
                        <div class="filter" ng-show="dispatch_filterSH.dispatch_end_date">
                            <input ng-model="dispatch_filter.dispatch_end_date">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                                ng-click="dispatch_filterSH.dispatch_end_date = false;dispatch_filter.dispatch_end_date = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dispatch_filterSH.dispatch_end_date">
                            <i class="material-icons search" style="z-index:1;" ng-click="dispatch_filterSH.dispatch_end_date = true">search</i>
                            <label ng-bind="'A06.header.dispatch_end_date'| translate"></label>
                            <i class="material-icons" ng-show="order_by_mode.name == 'dispatch_end_date'">{{order_by_mode.sort?'&#xE5DB;':'&#xE5D8;'}}</i>
                            <div class="kmi-can-click" ng-click="orderbychange('dispatch_end_date')"></div>
                        </div>
                    </div>
                </div>
                <div class="kmi-list__row-content">
                    <div ng-repeat="item in excelInfo track by $index">
                        <div style="display: flex;">
                            <div class="kmi-list__column" style="flex:0 0 40px;">
                                <button class="mdl-button mdl-js-button mdl-button--icon" ng-click="delete($index)">
                                    <img src="image/icons/delete1.png"></img>
                                </button>
                            </div>
                            <div class="kmi-list__column" style="flex:0 0 40px;">
                                <button class="mdl-button mdl-js-button mdl-button--icon">
                                    <img ng-show="item.dispatch_mode == '0'" src="image/icons/check0.png"></img>
                                    <img ng-show="item.dispatch_mode == '1'" src="image/icons/not1.png"></img>
                                    <img ng-show="item.dispatch_mode == '2'" src="image/icons/check1.png"></img>
                                </button>
                            </div>
                            <label class="label" ng-bind="'A06.header.lot_no' | translate"
                                style="margin-top: 6px; color: #1ab7cd; font-size: 17px;  font-weight: 800;"></label>
                            <div style="line-height: 32px;margin: 0 20px 0 2px;">{{item.lot_no}}</div>
                            <label class="label" ng-bind="'A06.header.op_no' | translate"
                                style="margin-top: 6px; color: #1ab7cd; font-size: 17px;  font-weight: 800;"></label>
                            <div style="line-height: 32px;margin: 0 20px 0 2px;">{{item.op_no}}</div>
                            <label class="label" ng-bind="'A06.header.total_qty' | translate"
                                style="margin-top: 6px; color: #1ab7cd; font-size: 17px;  font-weight: 800;"></label>
                            <div style="line-height: 32px;margin: 0 20px 0 2px;">{{item.total_qty}}</div>
                            <label class="label" ng-bind="'A06.header.errorMsg1' | translate" ng-show="item.dispatch_mode == '1'"
                                style="margin-top: 6px; color: #1ab7cd; font-size: 17px;  font-weight: 800;"></label>
                            <div style="line-height: 32px;margin: 0 20px 0 2px;" ng-show="item.dispatch_mode == '1'">{{item.error_msg}}</div>
                        </div>
                        <div class="kmi-list__row" ng-repeat="excelData in filterExcelInfo(item.excelDetailList, dispatch_filter) track by $index">
                            <div class="kmi-list__column" style="flex:0 0 40px"></div>
                            <div class="kmi-list__column" style="flex:0 0 40px"></div>
                            <div class="kmi-list__column" style="flex:1;" ng-bind="excelData.lot_no"></div>
                            <div class="kmi-list__column" style="flex:1;" ng-bind="excelData.op_no"></div>
                            <div class="kmi-list__column column-input" style="flex:1;">
                                <input readonly="readonly" ng-click="input_plot_qty($event, item, excelData);" ng-value="excelData.qty">
                            </div>
                            <div class="kmi-list__column" style="flex:1;" ng-bind="excelData.machine_no"></div>
                            <div class="kmi-list__column" style="flex:1;" ng-bind="excelData.dispatch_date"></div>
                            <div class="kmi-list__column" style="flex:1;" ng-bind="excelData.dispatch_start_date"></div>
                            <div class="kmi-list__column" style="flex:1;" ng-bind="excelData.dispatch_end_date"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="kmi-text-fields" style="height: 28px;">
                <div class="kmi-button kmi-button-confrim" ng-click="checkDataInfo();"
                    style="width:100px;height: 28px;position: absolute;left: 90%; top: 7px;" ng-show="showFlag == '1'">
                    <label ng-bind="'A06.btn.dataValidation' | translate" class="ng-binding"></label>
                    <div class="kmi-can-click"></div>
                </div>
                <div class="kmi-button kmi-button-confrim" ng-click="planImport();"
                    style="width:100px;height: 28px;position: absolute;left: 90%; top: 7px;" ng-show="showFlag == '2'">
                    <label ng-bind="'A06.btn.planImport' | translate" class="ng-binding"></label>
                    <div class="kmi-can-click"></div>
                </div>
            </div>
        </div>
        <!-- <div class="kmi-layout-page" style="height: 40%;">
            <div>
                <div class="kmi-text-fields" style="height: 40px;background: #ebebeb;">
                    <label class="label" ng-bind="'A06.header.waiting_info' | translate"
                        style="margin-left: 5px;color: #1ab7cd; font-size: 17px;  font-weight: 800;"></label>
                </div>
            </div>
            <div class="kmi-list machine-list">
                <div class="kmi-list__header">
                     
                     <div class="kmi-list__column require head-controls" style="flex:1;">
                        <div class="filter" ng-show="dispatch_filterSH.errorMsg">
                            <input ng-model="dispatch_filter.errorMsg">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                                ng-click="dispatch_filterSH.errorMsg = false;dispatch_filter.errorMsg = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dispatch_filterSH.errorMsg">
                            <i class="material-icons search" style="z-index:1;" ng-click="dispatch_filterSH.errorMsg = true">search</i>
                            <label ng-bind="'A06.header.errorMsg'| translate"></label>
                            <i class="material-icons" ng-show="order_by_error_mode.name == 'errorMsg'">{{order_by_error_mode.sort?'&#xE5DB;':'&#xE5D8;'}}</i>
                            <div class="kmi-can-click" ng-click="orderbyErrorChange('errorMsg')"></div>
                        </div>
                    </div>
                    
                     <div class="kmi-list__column require head-controls" style="flex:1;">
                        <div class="filter" ng-show="dispatch_filterSH.lot_no">
                            <input ng-model="dispatch_filter.lot_no">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                                ng-click="dispatch_filterSH.lot_no = false;dispatch_filter.lot_no = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dispatch_filterSH.lot_no">
                            <i class="material-icons search" style="z-index:1;" ng-click="dispatch_filterSH.lot_no = true">search</i>
                            <label ng-bind="'A06.header.lotNo'| translate"></label>
                            <i class="material-icons" ng-show="order_by_error_mode.name == 'lot_no'">{{order_by_error_mode.sort?'&#xE5DB;':'&#xE5D8;'}}</i>
                            <div class="kmi-can-click" ng-click="orderbyErrorChange('lot_no')"></div>
                        </div>
                    </div>
                   
                     <div class="kmi-list__column require head-controls" style="flex:1;">
                        <div class="filter" ng-show="dispatch_filterSH.op_no">
                            <input ng-model="dispatch_filter.op_no">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                                ng-click="dispatch_filterSH.op_no = false;dispatch_filter.op_no = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dispatch_filterSH.op_no">
                            <i class="material-icons search" style="z-index:1;" ng-click="dispatch_filterSH.op_no = true">search</i>
                            <label ng-bind="'A06.header.opNo'| translate"></label>
                            <i class="material-icons" ng-show="order_by_error_mode.name == 'op_no'">{{order_by_error_mode.sort?'&#xE5DB;':'&#xE5D8;'}}</i>
                            <div class="kmi-can-click" ng-click="orderbyErrorChange('op_no')"></div>
                        </div>
                    </div>
                    
                     <div class="kmi-list__column require head-controls" style="flex:1;">
                        <div class="filter" ng-show="dispatch_filterSH.wait_dispatch_qty">
                            <input ng-model="dispatch_filter.wait_dispatch_qty">
                            <i class="material-icons clear" style="position: absolute;top: 2px;right: 4px;"
                                ng-click="dispatch_filterSH.wait_dispatch_qty = false;dispatch_filter.wait_dispatch_qty = '';">clear</i>
                        </div>
                        <div class="order" ng-hide="dispatch_filterSH.wait_dispatch_qty">
                            <i class="material-icons search" style="z-index:1;" ng-click="dispatch_filterSH.wait_dispatch_qty = true">search</i>
                            <label ng-bind="'A06.header.wait_dispatch_qty'| translate"></label>
                            <i class="material-icons" ng-show="order_by_error_mode.name == 'wait_dispatch_qty'">{{order_by_error_mode.sort?'&#xE5DB;':'&#xE5D8;'}}</i>
                            <div class="kmi-can-click" ng-click="orderbyErrorChange('wait_dispatch_qty')"></div>
                        </div>
                    </div>
                </div>
                <div class="kmi-list__row-content">
                    <div class="kmi-list__row" ng-repeat="item in filterErrorInfo(errorInfo, dispatch_filter) track by $index">
                        <div class="kmi-list__column" style="flex:1;" ng-bind="item.errorMsg"></div>
                        <div class="kmi-list__column" style="flex:1;" ng-bind="item.lot_no"></div>
                        <div class="kmi-list__column" style="flex:1;" ng-bind="item.op_no"></div>
                        <div class="kmi-list__column" style="flex:1;" ng-bind="item.wait_dispatch_qty"></div>
                    </div>
                </div>
            </div>
            <div class="kmi-text-fields" style="height: 28px;">
                <div class="kmi-button kmi-button-confrim" ng-click="checkDataInfo();"
                    style="width:100px;height: 28px;position: absolute;left: 90%; top: 13px;" ng-show="showFlag == '1'">
                    <label ng-bind="'A06.btn.dataValidation' | translate" class="ng-binding"></label>
                    <div class="kmi-can-click"></div>
                </div>
                <div class="kmi-button kmi-button-confrim" ng-click="planImport();"
                    style="width:100px;height: 28px;position: absolute;left: 90%; top: 13px;" ng-show="showFlag == '2'">
                    <label ng-bind="'A06.btn.planImport' | translate" class="ng-binding"></label>
                    <div class="kmi-can-click"></div>
                </div>
            </div>
        </div> -->
    </div>
</div>